package net.exoweb.animate.graphics
{
    import net.exoweb.animate.common.Maths;
    import net.exoweb.animate.graphics.GShape;

    public class GNail extends GShape
    {
        protected var _borderColor:uint;

        public function GNail(borderColor:uint=0xFFFFFF, color:uint=0, bm:String="normal")
        {
            super(color, bm);
            _borderColor = borderColor;
        }

        public function set borderColor(v:uint):void
        {
            _borderColor = v;
            display();
        }

        public function get borderColor():uint
        {
            return _borderColor;
        }

        override public function display():void
        {
            graphics.clear();
            graphics.lineStyle(1, _borderColor);
            graphics.beginFill(color);
            graphics.drawCircle(0, 0, 4);
            graphics.endFill();
            graphics.moveTo(-2, 0);
            graphics.lineTo(2, 0);
        }
    }
}
